<?php
/**
 * Created by PhpStorm.
 * User: lih
 * Date: 2018/4/22
 * Time: 9:04
 */

use yii\db\Migration;

class m180506_012345_v100 extends Migration
{
    public function up()
    {
        /**
         * 修改user表
         */
        $sql = <<<EOD
ALTER TABLE `xdz_ucenter_members`
  ADD `utype` int(11) NOT NULL DEFAULT '0',
  ADD `sessionid` CHAR(255) NOT NULL DEFAULT '';
EOD;
        $this->db->createCommand($sql)->execute();

        /**
         * 修改forum_thread表
         */
        $sql = <<<EOD
ALTER TABLE `xdz_forum_thread`
  ADD `mediaextra` VARCHAR(2048) NOT NULL DEFAULT '';
EOD;
        $this->db->createCommand($sql)->execute();


    }

    public function down()
    {

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
